package golf;

import java.sql.ResultSet;
import java.sql.SQLException;

import database.DAO;

public class Course {
	public Course(){}

	/*
	 * CRSNO	NUMBER(38,0)
CRSNM	VARCHAR2(50 BYTE)
CRSHOLENO	NUMBER(38,0)
CRSDIFFICDCLASSIFY	CHAR(5 BYTE)
CRSDIFFICD	CHAR(5 BYTE)
	 */
	
	int no;
	String name;
	String difficulty;
	Hole[] hole;
	public Course(ResultSet rs){
		try {
			setNo( rs.getInt("CRSNO") );
			setName( rs.getString("CRSNM") );
			setDifficulty( rs.getString("DIFFICULTY") );
			
			hole = DAO.getInstance().getHoleList(getNo());
			
			System.out.println("Course() 완료");
		} catch (SQLException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}
	
	
	public int getNo() {
		return no;
	}

	public void setNo(int no) {
		this.no = no;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getDifficulty() {
		return difficulty;
	}

	public void setDifficulty(String difficulty) {
		this.difficulty = difficulty;
	}

}
